package com.pyue.eam.regi.controller;

import com.pyue.eam.admin.api.dto.chart.PerformanceUrl;
import com.pyue.eam.common.core.util.R;
import com.pyue.eam.regi.service.CqTaskLibService;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
@RequestMapping("/performance")
@Tag(description = "performance", name = "绩效数据")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class PerformanceController {
    private final CqTaskLibService cqTaskLibService;
    /**
     * 个人中心绩效指标
     */
    @GetMapping("/userPerformance")
    public R<List<PerformanceUrl>> userPerformance() {
        return R.ok(cqTaskLibService.performance());
    }

}
